﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
using UnityEngine.UI;

    
public class ScenceScript : NetworkBehaviour
{
    public Text canvasStatusText;
    public Phone_CameralContol phone_CameralContol;

    [SyncVar(hook = nameof(OnStatusTextChanged))]
    public string statusText;

    private void OnStatusTextChanged(string oldStr, string newStr)
    {
        canvasStatusText.text = statusText;
    }
    public void ButtonSendMessage()
    {
        if (phone_CameralContol != null)
        {
            phone_CameralContol.CmdSendPlayerMessage();
        }
    }
}
